#ifndef MUTEXLOCKGUARD_H
#define MUTEXLOCKGUARD_H
#include "mutexlock.h"

/**
 * 互拆锁控制
 * @brief The MutexLockGuard class
 */
class MutexLockGuard :public ProhibitAssignment
{
public:
    // 覆盖默认复制构造函数
    explicit MutexLockGuard(MutexLock & mutexLock):
        mutex(mutexLock)
    {
        this->mutex.lock();
    }

    ~MutexLockGuard();

private:
    MutexLock & mutex;
};

#endif // MUTEXLOCKGUARD_H
